# We use buildroot to make the root filesystem
# See https://gitee.com/unicornx/buildroot
# Checkout proper branch
# When build is completed, we get rootfs.ext2

source ./envsetup

WS_BR=$WS/test-buildroot

PATH_ROOTFS_DIR=$WS/test-buildroot/out-rv64-virt/images/rootfs

sudo mount -o loop $PATH_ROOTFS_IMAGE $PATH_ROOTFS_DIR

sudo mkfs.ext2 /dev/sdb2

sudo mount /dev/sdb2 ~/ws/u-disk
sudo cp -a $PATH_ROOTFS_DIR/* ~/ws/u-disk

